using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using RecruitmentSystem.Business;
using RecruitmentSystem.Common;
using System.Collections.Generic;

public partial class SystemManagement_StudentResumeManagement : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindDataList();
        }
    }
    protected void btnSearch_Click(object sender, ImageClickEventArgs e)
    {
        BindDataList();
    }

    private void BindDataList()
    {
        string sname = null;
        string ename = null;
        string pname = null;
        if (this.txtEnterpriseName.Text.Trim() != "")
        {
            ename = this.txtEnterpriseName.Text;
        }
        if (this.txtPositionName.Text.Trim() != "")
        {
            pname = this.txtPositionName.Text;
        }
        if (this.txtStudentName.Text.Trim() != "")
        {
            sname = this.txtStudentName.Text;
        }
        JobManager jm = new JobManager();
        AspNetPager1.RecordCount = jm.GetUserPositionsCount(sname, ename, pname);
        DataList1.DataSource = jm.GetUserPositions(sname, ename, pname, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, UserType.PersonalUser);
        DataList1.DataBind();
    }

    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        BindDataList();
    }
}
